package cn.com.nou.base.service.login;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.nou.base.dao.NouUserInfoMapper;
import cn.com.nou.common.entity.NouUserInfoT;

@Service
public class LoginCheckServiceImpl implements LoginCheckService {
	@Autowired
	private NouUserInfoMapper userInfoMapper;

	@Override
	public NouUserInfoT checkLogin(String userName, String passWord) {
		if(userName!=null &&!"".equals(userName)) {
			NouUserInfoT user = userInfoMapper.getUserByName(userName);
			if(passWord.equals(user.getPassWord())) {
				return user;
			}else {
				return null;
			}
		}
		else 
			return null;
	}
}
